import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import About from '../views/About.vue'
import Cinema from '../views/Cinema.vue'
import My from '../views/My.vue'

import Details from '../components/details/Details.vue'
import Details2 from '../components/details/Details2.vue'
import Top from '../components/details/top.vue'
import HomeDetail from '../components/details/HomeDetail.vue'
import Xiangqing from '../components/cinema/Xiangqing.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      showTab: true
    }
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: About,
    meta: {
      showTab: true
    }
  },
  {
    path: '/cinema',
    name: 'Cinema',
    component: Cinema,
    meta: {
      showTab: false
    }
  },
  {
    path: '/my',
    name: 'My',
    component: My,
    meta: {
      showTab: false
    }
  },
  
  {
    path: '/details/:id',
    name: 'Details',
    component: Details,
    meta: {
      showTab: false
    }
  },
  {
    path: '/details2/:id',
    name: 'Details2',
    component: Details2,
    meta: {
      showTab: false
    }
  },
  {path:'/top/:id',
  name:'Top',
  component:Top,
  meta: {
    showTab: false
  }
},
{path:'/xiangqing/:id',
  name:'Xiangqing',
  component:Xiangqing,
  meta: {
    showTab: false
  }
},
{
  path:'/homedetail/:id',
  name:'HomeDetail',
  component:HomeDetail,
  meta: {
    showTab: false
  }

}
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
